package com.cy.dda;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.spring4all.swagger.EnableSwagger2Doc;

@SpringBootApplication
@EnableTransactionManagement
@EnableCaching
@ServletComponentScan
@EnableSwagger2Doc
@RestController
@Slf4j
public class DdaApplication extends SpringBootServletInitializer{

	public static void main(String[] args) {
		SpringApplication.run(DdaApplication.class, args);
	}
	
	@Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(DdaApplication.class);
    }
	
	@RequestMapping("")
    public String index() {
	    log.info("您好！贷贷安！");
        return "您好！贷贷安！";
    }
}
